<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>副总经理外出审批</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
    <link rel="stylesheet" href="/css/demo.css">
    <link rel="stylesheet" href="/css/font-awesome.css">
    <link rel="stylesheet" href="/css/sky-mega-menu.css">

    <link rel="stylesheet" href="/css/bootstrap.css">
    <link rel="stylesheet" href="/css/bootstrap-theme.css">





</head>
<body class="bg-blue" onload="open();">
<div class="body" >
    <!-- mega menu -->
    <ul class="sky-mega-menu sky-mega-menu-anim-scale sky-mega-menu-response-to-icons">
        <!-- about -->
        <li>
            <a href="#"><i class="fa fa-lemon-o"></i>考勤管理系统</a>
        </li>

        <li class="right">
            <a href="/daka"><i class="fa fa-tags"></i>今日打卡</a>

        </li>
        <!-- contacts -->
        <li class="right">
            <a href="#_"><i class="fa fa-phone"></i>事项管理</a>
            <div class="grid-container3">
                <ul>
                    <li><a href="/leave"><i class="fa fa-briefcase"></i>请假</a></li>
                    <li><a href="/out"><i class="fa fa-briefcase"></i>外出</a></li>
                    <li><a href="/comleave"><i class="fa fa-briefcase"></i>调休</a></li>
                </ul>
            </div>
        </li>
        <!--/ contacts -->

        <!-- drop me a line -->
        <li aria-haspopup="true" class="right">
            <a href="#_"><i class="fa fa-tasks"></i>员工信息</a>
            <div class="grid-container3">
                <ul>
                    <li><a href="/info"><i class="fa fa-user"></i>个人信息</a></li>
                    <li><a href="/cal"><i class="fa fa-print"></i>打卡记录</a></li>
                    <li><a href="/logout"><i class="fa fa-chevron-circle-right"></i>注销</a></li>
                </ul>
            </div>

    </ul>
    <!--/ mega menu -->
    <div class="col-lg-12"><br><br></div>
    <div class="col-lg-4">
        <ul class="nav nav-pills nav-stacked" style="width:200px;text-align:center">

            <li class="active"><a href="/deputy/agreeleave">请假审批</a></li>
            <li class="active"><a href="/deputy/agreeout">外出审批</a></li>
            <li class="active"><a href="/deputy/agreecomleave">调休审批</a></li>
        </ul>
    </div>

    <div class="col-lg-8 ">
        <form class="row">
            <div class="form-group col-lg-3">
                <input type="date" class="form-control"placeholder="开始时间">
            </div>
            <div class="form-group col-lg-3">
                <input type="date" class="form-control"  placeholder="结束时间">
            </div>
            <div class="form-group col-lg-2">
                <select class="form-control pull-left">
                    <option>拒绝</option>
                    <option>通过</option>
                    <option>待定</option>
                </select>
            </div>

            <button type="submit" class="btn btn-default ">查询</button>
            <div class="pull-right">
                <button class="btn btn-success mybtn" >
                    全部同意</button>

                <button class="btn btn-danger mybtn" >
                    全部拒绝</button>
            </div>
        </form>
        <div class=" bg-white">
            <table class="table table-striped">
                <!-- On rows -->
                <thead >
                <th>
                    <label><input type="radio"  >全选</label>
                </th>
                <th >姓名</th>
                <th >类型</th>
                <th >开始时间</th>
                <th >结束时间</th>
                <th >审批进程</th>
                <th >管理</th>
                </thead>
                <tbody th:each="obj:${list}">

                <tr th:id="${obj.oid}">
                    <td>
                        <label>
                            <input type="radio" >
                        </label>
                        <span th:text="${obj.oid}"></span>
                        <input th:value="${obj.ogeneralagree}" type="hidden" name="generalagree">
                        <input th:value="${obj.odeputyagree}" type="hidden" name="deputyagree">
                        <input th:value="${obj.odividagree}" type="hidden" name="dividagree">
                    </td>
                    <td th:text="${obj.ename}"></td>
                    <td >外出</td>
                    <td th:text="${obj.ostarttime}"></td>
                    <td th:text="${obj.oendtime}"></td>
                    <td th:if="${obj.ogeneralagree eq 0}" >正在审批</td>
                    <td th:if="${obj.ogeneralagree ne 0}" >审批完成</td>

                    <td >
                        <button class="btn btn-success mybtn" th:name="${obj.oid}" onclick="agree(this);" >
                            <span th:if="${obj.odeputyagree} eq 1">已同意</span>
                            <span th:if="${obj.odeputyagree} ne 1">同意</span>
                        </button>
                        <button class="btn btn-danger mybtn" th:name="${obj.oid}" onclick="refuse(this);">
                            拒绝</button>
                    </td>
                </tr>


                </tbody>

            </table>
            <nav aria-label="Page navigation" class="pull-right">
                <ul class="pagination">
                    <li>
                        <a href="#" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li><a href="#">1</a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                    <li>
                        <a href="#" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>

        </div>




    </div>
</div>


</body>


<script src="/js/moment-with-locales.js"></script>
<script type="text/javascript" src="https://lib.baomitu.com/jquery/3.3.1/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js" ></script>
<script src="/js/bootstrap.js"></script>
<script type="text/javascript" src="/layer/layer.js"></script>
<script src ="/js/deputyoutlist.js"></script>
</html>